/*
 * Copyright 2010 Assert Developments
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * 	http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package be.ad.coffeebreak.domain;

import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;

/**
 * @author Stefan Bangels
 */
@Entity
@Table(name = "ACTUAL_PROJECT_HOURS")
@SequenceGenerator(name = "ACTUAL_PROJECT_HOURS_SEQ", sequenceName = "ACTUAL_PROJECT_HOURS_SEQ")
@XmlRootElement
public class ActualProjectHours implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "ACTUAL_PROJECT_HOURS_SEQ")
    private Long id;
    @NotNull
    private Integer fromHour;
    @NotNull
    private Integer toHour;
    private String description;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getFromHour() {
        return fromHour;
    }

    public void setFromHour(Integer fromHour) {
        this.fromHour = fromHour;
    }

    public Integer getToHour() {
        return toHour;
    }

    public void setToHour(Integer toHour) {
        this.toHour = toHour;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Override
    public String toString() {
        return "ActualProjectHours{" +
                "id=" + id +
                ", fromHour=" + fromHour +
                ", toHour=" + toHour +
                ", description='" + description + '\'' +
                '}';
    }

}
